#include "../fifo.h"

int main(int argc,char ** argv)
{
	int readfifo,writefifo;
	size_t len;
	ssize_t n;
	pid_t pid;
	char *ptr=NULL,fifoname[MAXLINE],buff[MAXLINE];
	pid = getpid();

	snprintf(fifoname,sizeof(fifoname),"/tmp/fifo.%ld",(long)pid);
	if((mkfifo(fifoname,FILE_MODE)<0)&&(errno!=EEXIST))
	{
		perror("mkfifo()");
	}
	snprintf(buff,sizeof(buff),"%ld",(long)pid);
	
	exit(0);
}
